package main

import "fmt"

func f1() int {
	n := 100
	defer func() {
		n++
	}()
	return n
}
func f2() (x int) {
	defer func() {
		x++
	}()
	return 5
}
func f3() (x int) {
	defer func(x int) {
		x++
	}(x)
	return 5
}
func f4() (x int) {
	n := 10
	defer func() {
		n++
	}()
	return n
}

func main() {
	fmt.Println(f1())
	fmt.Println(f2())
	fmt.Println(f3())
	fmt.Println(f4())

}
